import unittest
from api.yun_api import login

class Text_login(unittest.TestCase):

    def text_01(self):
        mobile = 'peter'
        password = 'admin'
        code = 200
        json_data = login(mobile, password)

        self.assertEqual(json_data['result'], code)

    def text_02(self):
        mobile = 'peter'
        password = '123456'
        code = 4
        json_data = login(mobile, password)

        self.assertEqual(json_data['result'], code)

    def text_03(self):
        mobile = '13800000002'
        password = 'admin'
        code = 5
        json_data = login(mobile, password)

        self.assertEqual(json_data['result'], code)